Creat XTS object DATE = c(20070103L, 20070104L, 20070105L, 20070108L, 20070109L,20070110L, 20070111L, 20070112L, 20070115L) CLOSE = c(54.7, 54.77, 55.12, 54.87, 54.86, 54.27, 54.77, 55.36, 55.76) DATE <- as.Date(as.character(DATE),format="%Y%m%d") PRICE <- list("Date"=DATE, "Close"=CLOSE) # remember to set the colnames otherwise wot work PriceXTS <- xts(PRICE$Close, PRICE$Date) x <- xts(1:3, Sys.Date()+1:3) xx <- cbind(x,x)